/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.wdm.utils;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import org.wdm.beans.points.Point;

/**
 *
 * @author thanasis
 */
public class PointSerializer implements JsonSerializer<Point>
{
  @Override
  public JsonElement serialize(Point src, Type typeOfSrc, JsonSerializationContext context)
  {
    Gson gson = new Gson();
    return gson.toJsonTree(src, Point.class);
  }
}